﻿import * as actionTypes from './actionTypes';

export const expand = (department, section) =>
    ({ type: actionTypes.EXPAND_AUTH, department, section });

export const checkPerm = (department, section, teacher, idx) =>
    ({ type: actionTypes.CHECK_PERM, department, section, teacher, idx });

export const selectTeacher = (department, section, teacher) =>
    ({ type: actionTypes.SELECT_TEACHER, department, section, teacher });

export const submitChanges = current => // current:{department,section,teacher}
    ({ type: actionTypes.SUBMIT, current });

export const cancelChanges = current => // current:{department,section,teacher}
    ({ type: actionTypes.CANCEL,current });